From: Florian Müllner Date: Sat, 2 Mar 2013 18:56:37 +0000 (+0100) Subject: switcherPopup: Cancel the OSD popup before showing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4585 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=deb77a4dde952227342f1a7177ad5247b462834c;p=gnome-shell.git switcherPopup: Cancel the OSD popup before showing It is irritating to show two different system popups at the same time, so let switcher popups like alt-tab cancel out the OSD. https://bugzilla.gnome.org/show_bug.cgi?id=613543 --- diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index fc90ed288..efcd10dc9 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -140,6 +140,15 @@ const OsdWindow = new Lang.Class({ Lang.bind(this, this._hide)); }, + cancel: function() { + if (!this._hideTimeoutId) + return; + + Mainloop.source_remove(this._hideTimeoutId); + this._hideTimeoutId = 0; + this._hide(); + }, + _hide: function() { Tweener.addTween(this.actor, { opacity: 0, diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index bfe172b0c..b31dc2edb 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -160,6 +160,7 @@ const SwitcherPopup = new Lang.Class({ // disturbed by the popup briefly flashing. this._initialDelayTimeoutId = Mainloop.timeout_add(POPUP_DELAY_TIMEOUT, Lang.bind(this, function () { + Main.osdWindow.cancel(); this.actor.opacity = 255; this._initialDelayTimeoutId = 0; }));